package com.open.capacity.sign.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.open.capacity.common.model.Sign;
import com.open.capacity.common.model.SignReport;
import com.open.capacity.common.model.SysParam;
import com.open.capacity.common.model.SysUser;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface SignDao extends BaseMapper<Sign> {
    Integer signOut(Sign signLog);

    Integer findSignInState(Sign sign);

    Integer editSignOut(Sign sign);

    Integer editSignIn(Sign sign);
    Sign findSignOut(Sign sign);

    Sign findSignIn(Sign sign);

    Integer signIn(Sign sign);

    int count(Map<String, Object> params);

    List<Sign> findList(Map<String, Object> params);

    Integer checkedSignInState(Sign sign);

    Sign findDaily(Sign sign);

    Integer signUpdate(Sign sign);

    Integer signDelete(Sign sign);

    List<SysParam> getParamByAttr(SysParam params);

    Integer signParamUpdate(SysParam param);

    String getParamByKey(SysParam param);

    List<SignReport> findCountList(Map<String, Object> params);

    int getCount(Map<String, Object> params);

    int setSignState(Sign sign);

    List<SysUser> getUsers();

    int findDayoffByDate(String nowDate);

    int updateSignState(Sign sign);//改变签到表中的状态

    List<Sign> getSignsByTime(Sign sign);//根据时间获取签到表列表
}
